# Plugin analysis

## Overview

In the **Rsdoctor** `Compile Analysis` secondary page `Plugins Analysis`, we can see the invocation data of all **Compiler Hooks** and **Compilation Hooks** used by the current Rspack or webpack project. The content is shown in the following figure:

<img
  src="https://assets.rspack.rs/others/assets/rsdoctor/plugins-analysis-overall.png"
  width={'600px'}
  style={{ margin: 'auto' }}
/>

:::tip
The plugin time will also calculate the internal plugin time of Rsdoctor.
:::

## Glossary

The meanings of the fields in the data statistics table on the page are as follows:

| Term                          | Description                                                                                               |
| ----------------------------- | --------------------------------------------------------------------------------------------------------- |
| <b><i>Plugin Tap Name</i></b> | Represents the name value when [.tap is called](https://github.com/webpack/tapable#hookhookmap-interface) |
| <b><i>Hook</i></b>            | Represents the **hook name**                                                                              |
| <b><i>calls</i></b>           | Represents the **number of times called**                                                                 |
| <b><i>duration(total)</i></b> | Represents the **total time of all calls**                                                                |

## Usage instructions

### View bundler config

If we need to view the Rspack or webpack configuration of the project, we can click on `View Bundler Config` in the upper right corner of the card. A floating layer will pop up, which contains the serialized **Bundler Config**, as shown in the following figure:

<img
  src="https://assets.rspack.rs/others/assets/rsdoctor/plugins-analysis-config.png"
  width={'400px'}
  style={{ margin: 'auto' }}
/>

## Reference documentation

- [**Rspack Hooks**](https://www.rspack.rs/api/plugin-api.html#beforecompile)
- [**Webpack Hooks**](https://webpack.js.org/api/compilation-hooks/)
